From : J C Caulfield (J.Caulfield@ucl.ac.uk)
Subject : AGA dual playfield
> Has anyone got dual playfields working with 8 colours in the foreground
> and 8 in the back using the new display libs?
Here's an example of a dualplayfield for AGA machines with two 16 colour playfields. It
can be easily modified for 2 8 colour playfields (don't forget to remove the
DisplayControls command), but I can post you the same example for ECS machines if you
like (I tried it last night).
-------%<--------------------------------------------------------
#agapalette=$10000
#dualplayfield=$20
VWait 50 : BLITZ
BitMap 0,320,256,4 ;\Couple of 16 colour
BitMap 1,320,256,4 ;/bitmaps for dual playfield
InitPalette 0,32 ; 32 colour palette (2x16)
For i.w=0 To 15 ; reds for foreground
AGAPalRGB 0,i,i*8,0,0
Next
For i=0 To 15 ; greens for background
AGAPalRGB 0,i+16,0,i*8,0
Next
; copper list for AGA dualplayfield, 8 planes, 32 colour palette
InitCopList 0,42,256,#agapalette|#dualplayfield|$8,8,32,0
; set second playfield to use colours 16+
DisplayControls 0,$0,$1d00,$0
CreateDisplay 0 ;\
DisplayBitMap 0,0,1 ; >Usual stuff
DisplayPalette 0,0 ;/
Use BitMap 0 ; circles in the foreground
For i=1 To 50
VWait
Circlef Rnd(299)+10,Rnd(235)+10,10,Rnd(15)
DisplayBitMap 0,0,1
Next
Use BitMap 1 ; start filling background
Repeat
VWait
Circlef Rnd(299)+10,Rnd(235)+10,10,Rnd(15)
DisplayBitMap 0,0,1
Until Joyb(0)
End
-------%<--------------------------------------------------